package com.example.demo.model;

import com.example.demo.Enum.BookingType;
import com.example.demo.Interface.CorporateBookingChecks;
import com.example.demo.Interface.PersonalBookingChecks;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.time.LocalDate;

@lombok.Data
public class Booking {

    private BookingType type;

    @NotBlank(message = "Corporate name cannot be blank", groups = PersonalBookingChecks.class)
    private String personalName;


    @Email(message = "Invalid email format", groups = PersonalBookingChecks.class)
    private String personalEmail;

    @NotBlank(message = "Corporate name cannot be blank", groups = CorporateBookingChecks.class)
    private String coName;


    @Email(message = "Invalid email format", groups = CorporateBookingChecks.class)
    private String coEmail;

    @NotNull(message = "Check-in date cannot be null")
    private LocalDate checkInDate;


    @Future(message = "Check-in date cannot be in the past")
    private LocalDate checkOutDate;

}
